# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         pop方法和popitem方法
# Description:
# Author:       asus
# Date:         2019/3/7
#-------------------------------------------------------------------------------

#pop弹出指定元素
#popitem弹出最后一个元素
dict = {'c':10,'a':40,'b':12,'x':44}
dict['1'] = 3
dict['5'] = 3
#获取key为'b'的值
print(dict.pop('b'))
#弹出所有元素
for i in range(len(dict)):
    print(dict.popitem())